package com.ds.controller.router;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/")
public class RounerController{
	@RequestMapping(value = "blog/{id}", method = RequestMethod.GET)
	public ModelAndView blog(@PathVariable("id")String id) {
		ModelAndView mv=new ModelAndView("blog");
		return mv;
	}
	
	@RequestMapping(value = "index", method = RequestMethod.GET)
	public ModelAndView index() {
		return new ModelAndView("admin/index");
	}	
	
	@RequestMapping(value = "admin", method = RequestMethod.GET)
	public ModelAndView admin() {
		return new ModelAndView("admin");
	}	
	
	@RequestMapping("/unauthorized")
	public ModelAndView unauthorized() {
		return new ModelAndView("unauthorized");
	}
	
	@RequestMapping("/forbidden")
	public ModelAndView forbidden() {
		return new ModelAndView("forbidden");
	}
}
